/**
 * 订单状态
 */
const msgCategory = {
	//订单
	ORDER: 300
}

/**
 * 根据消息内容跳转到对应页面
 */

const detail = (data) => {
	let category = data.Category;
	let objectId = data.ObjectId;
	let messageId = data.MessageId;
	switch (Number(category)) {
		case msgCategory.ORDER:
			// 订单通知
			uni.navigateTo({
				url: '/pages/order/detail/detail?orderId=' + objectId
			})
			break;
		default:
			uni.navigateTo({
				url: `/pages/mine/middleFun/message/detail/detail?MessageId=${messageId}`
			});
			break;
	}
}

export default {
	detail
}
